<%@ include file="/WEB-INF/jsp/includes/include.jsp" %>
<%@ include file="/WEB-INF/jsp/includes/header.jsp" %>
<h2>Edit an Account</h2>
<c:url var="actionUrl" value="/user/editaccount.html"  />
<form:form action="${actionUrl}" modelAttribute="user">
	<fieldset class="row1">
		<div class="form-pair">	
			<div class="form-item">
				<label for="firstName">* First Name:</label>
			</div>
			<div class="form-value">
				<form:input path="firstName" size="30" maxlength="50" /><br /><form:errors path="firstName" cssClass="errors" />
 			</div>
		</div>
		<div class="form-pair">	
			<div class="form-item">
				<label for="lastName">* Last Name:</label>
			</div>
			<div class="form-value">
 			   <form:input path="lastName" size="30" maxlength="50" /><br /><form:errors path="lastName" cssClass="errors" />
 			</div>
		</div>
		<div class="form-pair">	
			<div class="form-item">
				<label for="userName">* User Name:</label>
			</div>
			<div class="form-value">
 			   <form:input path="username" size="30" maxlength="50" /><br /><form:errors path="username" cssClass="errors" />
 			</div>
		</div>
		<div class="form-pair">	
			<div class="form-item">
				<label for="emailAddress">* Email Address:</label>
			</div>
			<div class="form-value">
 			   <form:input path="emailAddress" size="30" maxlength="100" /><br /><form:errors path="emailAddress" cssClass="errors" />
 			</div>
		</div>
		<c:if test="${currentUser.id == user.id}">
			<div class="form-pair">	
				<div class="form-item">
					<label for="password">* Password:</label>
					<br /><small><a target="_blank" href="/password-strength.jsp">password strength</a></small>
				</div>
				<div class="form-value">
	 			   <form:password cssClass="password" path="password" size="30" maxlength="30" /><form:errors path="password" cssClass="errors" />
	 			</div>
			</div>
			<div class="form-pair">	
				<div class="form-item">
					<label for="cpassword">* Confirm Password:</label>
				</div>
				<div class="form-value">
	 			   <form:password path="cpassword" size="30" maxlength="30" /><br /><form:errors path="cpassword" cssClass="errors" />
	 			</div>
			</div>
		</c:if>
		<div class="form-pair">	
			<div class="form-item">
				<label for="age">* Age:</label>
			</div>
			<div class="form-value">
 			   <form:input path="age" size="30" maxlength="3" /><br /><form:errors path="age" cssClass="errors" />
 			</div>
		</div>
	</fieldset>
	<fieldset class="form-submit">
		<div class="form-submit-buttons">
			<input type="submit" class="input-submit" name="submit" value="Submit" />
		</div>
	</fieldset>
</form:form>
<%@ include file="/WEB-INF/jsp/includes/footer.jsp" %>